﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace SaleOffVn.Web.Modules
{
    public partial class Login : System.Web.UI.UserControl
    {
        #region Events

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                // default view 
                //Login1.DestinationPageUrl = "~/HomePage.aspx";
                Login1.Focus();
            }

        }

        protected void lbtForgotPassword_Click(object sender, EventArgs e)
        {
            // get & update user info
            Response.Redirect("~/ForgotPass.aspx");

        }

        protected void Login1_LoggedIn(object sender, EventArgs e)
        {
            string username = Login1.UserName;
            if ((username != null) && (username == "admin"))
            {
                Session["username"] = username;
                Response.Redirect("~/Administration/News.aspx");
            }
        }

        #endregion Events

        #region Utilitys

        #endregion Utilitys
    }
}